<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> 
    <title> - 天地维杰网</title>
    <meta name="keywords" content="系统架构,shutdown,不与天斗,Domino,博客,程序员,架构师,笔记,技术,分享,java,Redis">
    
    <meta property="og:title" content="">
    <meta property="og:site_name" content="天地维杰网">
    <meta property="og:image" content="/img/author.jpg"> 
    <meta name="title" content=" - 天地维杰网" />
    <meta name="description" content="天地维杰网 | 博客 | 软件 | 架构 | Java "> 
    <link rel="shortcut icon" href="http://www.shutdown.cn/img/favicon.ico" />
    <link rel="apple-touch-icon" href="http://www.shutdown.cn/img/apple-touch-icon.png" />
    <link rel="apple-touch-icon-precomposed" href="http://www.shutdown.cn/img/apple-touch-icon.png" />
    <link href="http://www.shutdown.cn/js/vendor/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />
    <link href="http://www.shutdown.cn/js/vendor/fancybox/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />
    <link href="http://www.shutdown.cn/css/main.css" rel="stylesheet" type="text/css" />
    <link href="http://www.shutdown.cn/css/syntax.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post"},
     fancybox: true, 
    motion: true
  };
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7826003325059020" crossorigin="anonymous"></script>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container one-collumn sidebar-position-left page-home  ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"> <div class="site-meta  custom-logo ">

  <div class="custom-logo-site-title">
    <a href="http://www.shutdown.cn"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">天地维杰网</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">人如秋鸿来有信，事若春梦了无痕</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
    <ul id="menu" class="menu">
      
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />首页
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/redis/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-battery-full"></i> <br />Redis
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/java/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-coffee"></i> <br />java
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/linux/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-linux"></i> <br />linux
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/daily/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-bug"></i> <br />日常问题
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/spring/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-child"></i> <br />Spring和Springboot
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/mac/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-fire"></i> <br />Mac相关
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/middleware/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-gavel"></i> <br />中间件
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/jiagou/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-rocket"></i> <br />架构
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/python/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-ship"></i> <br />python
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/front/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-bolt"></i> <br />前端
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/jvm/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-balance-scale"></i> <br />jvm
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/c/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-battery-empty"></i> <br />c语言
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/categories/web3/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-web3"></i> <br />web3
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/post/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />归档
          </a>
        </li>
      
        <li class="menu-item ">
          <a href="http://www.shutdown.cn/about/" rel="section">
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />关于
          </a>
        </li>
      
      <li class="menu-item menu-item-search">
        <a href="javascript:;" class="popup-trigger"> <i class="menu-item-icon fa fa-search fa-fw"></i> <br /> 搜索</a>
      </li>
    </ul>
    <div class="site-search">
      <div class="popup">
 <span class="search-icon fa fa-search"></span>
 <input type="text" id="local-search-input">
 <div id="local-search-result"></div>
 <span class="popup-btn-close">close</span>
</div>

    </div>
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
<section id="posts" class="posts-expand">
  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <header class="post-header">
      <h1 class="post-title" itemprop="name headline">
        <a class="post-title-link" href="http://www.shutdown.cn/post/redis6.0-tls%E6%B5%8B%E8%AF%95/" itemprop="url">
        
        </a>
      </h1>
      <div class="post-meta">
      <span class="post-time">
<span class="post-meta-item-icon">
    <i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">时间：</span>
<time itemprop="dateCreated" datetime="2016-03-22T13:04:35+08:00" content="0001-01-01">
    0001-01-01
</time>
</span> 
      
      
       <span>
&nbsp; | &nbsp;
<span class="post-meta-item-icon">
    <i class="fa fa-eye"></i>
</span>
<span class="post-meta-item-text">阅读：</span>
<span class="leancloud-visitors-count">332 字 ~2分钟</span>
</span>
      </div>
    </header>
    <div class="post-body" itemprop="articleBody">
    

    

<h3 id="背景">背景</h3>

<p>传输层安全性协议（英语：Transport Layer Security，缩写作TLS），及其前身安全套接层（Secure Sockets Layer，缩写作SSL）是一种安全协议，目的是为互联网通信提供安全及数据完整性保障。Redis6支持TLS，并且支持SSL。</p>

<h3 id="1-目录设置">1.目录设置</h3>

<p>redis源码解压目录</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">/app/cachecloud/redis</code></pre></div>
<p>测试环境：<code>CENTOS7.3</code>
redis版本：<code>6.2.7</code></p>

<h3 id="2-编译redis">2.编译redis</h3>

<p>要测试TLS，要在编译时选择编译TLS，跳转到redis源码解压目录，执行</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">make <span style="color:#000">BUILD_TLS</span><span style="color:#ce5c00;font-weight:bold">=</span>yes</code></pre></div>
<p>编译过程中出现如下错误：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">ssl.c:45:25: 致命错误：openssl/ssl.h：没有那个文件或目录
 <span style="color:#8f5902;font-style:italic">#include &lt;openssl/ssl.h&gt;</span></code></pre></div>
<div  align="center"><img src="https://wejack639.oss-cn-beijing.aliyuncs.com/blogimages/img/20220711110150.png" width = 900 /> </div>

<p>这时要中断编译，先安装<code>openssl</code></p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-fallback" data-lang="fallback">yum install openssl-devel</code></pre></div>
<p>安装好 <code>open-ssl</code>后再次执行<code>make BUILD_TLS=yes</code>命令即可编译成功</p>

<h3 id="3-生成测试证书">3.生成测试证书</h3>

<p>在源码目录执行生成证书脚本</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 ~<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># cd /app/cachecloud/redis</span>
<span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 redis<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># ./utils/gen-test-certs.sh</span>
Generating RSA private key, <span style="color:#0000cf;font-weight:bold">4096</span> bit long modulus
……</code></pre></div>
<p>生成后在<code>tests/tls</code>目录下可以看到生成的证书文件</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 tls<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># ls -l /app/cachecloud/redis/tests/tls/</span>
总用量 <span style="color:#0000cf;font-weight:bold">44</span>
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root <span style="color:#0000cf;font-weight:bold">1879</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 ca.crt
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root <span style="color:#0000cf;font-weight:bold">3243</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 ca.key
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root   <span style="color:#0000cf;font-weight:bold">17</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 ca.txt
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root <span style="color:#0000cf;font-weight:bold">1456</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 client.crt
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root <span style="color:#0000cf;font-weight:bold">1675</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 client.key
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root  <span style="color:#0000cf;font-weight:bold">163</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 openssl.cnf
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root <span style="color:#0000cf;font-weight:bold">1399</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 redis.crt
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root  <span style="color:#0000cf;font-weight:bold">424</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:34 redis.dh
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root <span style="color:#0000cf;font-weight:bold">1679</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 redis.key
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root <span style="color:#0000cf;font-weight:bold">1456</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 server.crt
-rw-r--r--. <span style="color:#0000cf;font-weight:bold">1</span> root root <span style="color:#0000cf;font-weight:bold">1679</span> 7月  <span style="color:#0000cf;font-weight:bold">11</span> 11:30 server.key</code></pre></div>
<h3 id="4-启动和连接">4.启动和连接</h3>

<p>使用tls模式启动redis服务，如下命令</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 tls<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># cd /app/cachecloud/redis</span>
<span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 redis<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># ./src/redis-server --tls-port 6379 --port 0 \</span>
&gt;     --tls-cert-file ./tests/tls/redis.crt <span style="color:#4e9a06">\
</span><span style="color:#4e9a06"></span>&gt;     --tls-key-file ./tests/tls/redis.key <span style="color:#4e9a06">\
</span><span style="color:#4e9a06"></span>&gt;     --tls-ca-cert-file ./tests/tls/ca.crt</code></pre></div>
<p><code>--tls-port 6379</code>指定了tls端口为6379，<code>--port 0</code> 禁用非tls的端口。</p>

<p>连接tls模式redis服务，连接后可以正常执行命令</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 ~<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># cd /app/cachecloud/redis</span>
<span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 redis<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># ./src/redis-cli --tls \</span>
&gt;     --cert ./tests/tls/redis.crt <span style="color:#4e9a06">\
</span><span style="color:#4e9a06"></span>&gt;     --key ./tests/tls/redis.key <span style="color:#4e9a06">\
</span><span style="color:#4e9a06"></span>&gt;     --cacert ./tests/tls/ca.crt
127.0.0.1:6379&gt; <span style="color:#204a87">set</span> hello world
OK
127.0.0.1:6379&gt; get hello
<span style="color:#4e9a06">&#34;world&#34;</span></code></pre></div>
<p>如果不使用tls模式直接连接tls模式的redis服务，虽然也可以正常连接，但是无法执行命令。</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#8f5902;font-style:italic">#客户端表现</span>
<span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 ~<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># redis-cli -p 6379</span>
127.0.0.1:6379&gt; get hello
Error: Connection reset by peer

<span style="color:#8f5902;font-style:italic">#服务端表现</span>
<span style="color:#ce5c00;font-weight:bold">[</span>root@redis-7-109 redis<span style="color:#ce5c00;font-weight:bold">]</span><span style="color:#8f5902;font-style:italic"># ./src/redis-server --tls-port 6379 --port 0 \</span>
&gt;     --tls-cert-file ./tests/tls/redis.crt <span style="color:#4e9a06">\
</span><span style="color:#4e9a06"></span>&gt;     --tls-key-file ./tests/tls/redis.key <span style="color:#4e9a06">\
</span><span style="color:#4e9a06"></span>&gt;     --tls-ca-cert-file ./tests/tls/ca.crt
9591:C <span style="color:#0000cf;font-weight:bold">11</span> Jul <span style="color:#0000cf;font-weight:bold">2022</span> 11:51:18.598 <span style="color:#8f5902;font-style:italic"># oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo</span>
9591:C <span style="color:#0000cf;font-weight:bold">11</span> Jul <span style="color:#0000cf;font-weight:bold">2022</span> 11:51:18.598 <span style="color:#8f5902;font-style:italic"># Redis version=6.2.7, bits=64, commit=00000000, modified=0, pid=9591, just started</span>
……省略……
9591:M <span style="color:#0000cf;font-weight:bold">11</span> Jul <span style="color:#0000cf;font-weight:bold">2022</span> 11:51:18.612 * Ready to accept connections
9591:M <span style="color:#0000cf;font-weight:bold">11</span> Jul <span style="color:#0000cf;font-weight:bold">2022</span> 11:51:43.594 <span style="color:#8f5902;font-style:italic"># Error accepting a client connection: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol (conn: fd=8)</span>
9591:M <span style="color:#0000cf;font-weight:bold">11</span> Jul <span style="color:#0000cf;font-weight:bold">2022</span> 11:51:50.771 <span style="color:#8f5902;font-style:italic"># Error accepting a client connection: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol (conn: fd=8)</span>
9591:M <span style="color:#0000cf;font-weight:bold">11</span> Jul <span style="color:#0000cf;font-weight:bold">2022</span> 14:02:37.069 <span style="color:#8f5902;font-style:italic"># Error accepting a client connection: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol (conn: fd=8)</span></code></pre></div>
<p>参考：
<a href="https://redis.io/docs/manual/security/encryption/">https://redis.io/docs/manual/security/encryption/</a></p>

    </div>
    <footer class="post-footer">
     

     <div class="post-nav">
    <div class="post-nav-next post-nav-item">
    
        <a href="http://www.shutdown.cn/post/redis6.0-lettuce%E6%94%AF%E6%8C%81%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%BC%93%E5%AD%98/" rel="next" title="">
        <i class="fa fa-chevron-left"></i> 
        </a>
    
    </div>

    <div class="post-nav-prev post-nav-item">
    
        <a href="http://www.shutdown.cn/post/redis6.0%E6%96%B0%E7%89%B9%E6%80%A7-acls%E6%9D%83%E9%99%90%E6%8E%A7%E5%88%B6/" rel="prev" title="">
         <i class="fa fa-chevron-right"></i>
        </a>
    
    </div>
</div>
      
     
     
     






    </footer>
  </article>
</section>

          </div>
        </div>
        <div class="sidebar-toggle">
  <div class="sidebar-toggle-line-wrap">
    <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
    <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
    <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
  </div>
</div>
<aside id="sidebar" class="sidebar">
  <div class="sidebar-inner">

    <section class="site-overview sidebar-panel  sidebar-panel-active ">
      <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image"
        src="http://www.shutdown.cn/img/author.jpg"
        alt="不与天斗Domino" />
    <p class="site-author-name" itemprop="name">不与天斗Domino</p>
    <p class="site-description motion-element" itemprop="description"> 
        Programmer &amp; Architect</p>
</div>
      <nav class="site-state motion-element">
    <div class="site-state-item site-state-posts">
      <a href="http://www.shutdown.cn/post/">
        <span class="site-state-item-count">183</span>
        <span class="site-state-item-name">日志</span>
      </a>
    </div>
    <div class="site-state-item site-state-categories">    
        <a href="http://www.shutdown.cn/categories/">      
         
        <span class="site-state-item-count">15</span>
        
        <span class="site-state-item-name">分类</span>
        
        </a>
    </div>

    <div class="site-state-item site-state-tags">
        <a href="http://www.shutdown.cn/tags/">
         
        <span class="site-state-item-count">224</span>
        
        <span class="site-state-item-name">标签</span>
        </a>
    </div>
</nav>
      
      

      

      <div class="links-of-blogroll motion-element inline">
<script type="text/javascript" src="//rf.revolvermaps.com/0/0/8.js?i=&amp;m=0&amp;s=220&amp;c=ff0000&amp;cr1=ffffff&amp;f=arial&amp;l=33&amp;bv=35" async="async"></script>
</div>

    </section>
    
  </div>
</aside>

      </div>
    </main>
   
    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  <span itemprop="copyrightYear">  &copy; 
  2013 - 2023</span>
  <span class="with-love"><i class="fa fa-heart"></i></span>
  <span class="author" itemprop="copyrightHolder">天地维杰网</span>
  <span class="icp" itemprop="copyrightHolder"><a href="https://beian.miit.gov.cn/" target="_blank">京ICP备13019191号-1</a></span>
</div>
<div class="powered-by">
  Powered by - <a class="theme-link" href="http://gohugo.io" target="_blank" title="hugo" >Hugo v0.63.2</a>
</div>
<div class="theme-info">
  Theme by - <a class="theme-link" href="https://github.com/xtfly/hugo-theme-next" target="_blank"> NexT
  </a>
</div>


      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
      <span id="scrollpercent"><span>0</span>%</span>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/jquery/index.js?v=2.1.3"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/fastclick/lib/fastclick.min.js?v=1.0.6"></script> 
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/velocity/velocity.min.js?v=1.2.1"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/vendor/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script src="http://www.shutdown.cn/js/vendor/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>

<script src="http://www.shutdown.cn/js/vendor/fancybox/jquery.fancybox.pack.js?v=2.1.5"></script>

<script type="text/javascript" src="http://www.shutdown.cn/js/utils.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/motion.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/affix.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/schemes/pisces.js"></script>

<script type="text/javascript" src="http://www.shutdown.cn/js/scrollspy.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/post-details.js"></script>
<script type="text/javascript" src="http://www.shutdown.cn/js/toc.js"></script>

<script type="text/javascript" src="http://www.shutdown.cn/js/bootstrap.js"></script>

<script type="text/javascript" src="http://www.shutdown.cn/js/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$','$'] ],
      displayMath: [ ['$$','$$'] ],
      processEscapes: true
    },
    "HTML-CSS": { fonts: ["TeX"] }
  });
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML' async></script>
</body>
</html>